package com.lujianbuping.system.opportunityprojectmanagementsystem.dao;

import com.lujianbuping.system.opportunityprojectmanagementsystem.entity.DepartmentEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface DepartmentMapper {
//	@Delete("delete from opms_department where id = ?")
    int deleteByPrimaryKey(Integer id);

//	@Insert("insert into opms_department(id,department_name,create_user_id,create_time,last_change_user_id,last_change_time) values(#{id},#{departmentName},#{createUserId},#{createTime},#{lastChangeUserId},#{last_change_time})")
    int insert(DepartmentEntity record);
	
//	@Insert("insert into opms_department values(#{id},#{departmentName},#{createUserId},#{createTime},#{lastChangeUserId},#{lastChangeTime})")
    int insertSelective(DepartmentEntity record);

//    @Select("select * from opms_department where id=?")
    DepartmentEntity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DepartmentEntity record);
    
    int updateByPrimaryKey(DepartmentEntity record);
    
//    @Select("select * from opms_department")
    List<DepartmentEntity>  selectAll(@Param("orderBy") String orderBy);
    
    List<DepartmentEntity> selectByKeyWithPagination(@Param("key") String key, @Param("pageNo") int pageNo, @Param("pageSize") int pageSize);

}